
$(document).ready(function(){

//页面防缩比例控制-----------------------------------------------
var docEl = document.documentElement,
    //当设备的方向变化（设备横向持或纵向持）此事件被触发。绑定此事件时，
    //注意现在当浏览器不支持orientationChange事件的时候我们绑定了resize 事件。
    //总来的来就是监听当然窗口的变化，一旦有变化就需要重新设置根字体的值
    resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
    recalc = function() {
        //设置根字体大小
        docEl.style.fontSize = '16px'
    };

//绑定浏览器缩放与加载时间
window.addEventListener(resizeEvt, recalc, false);
document.addEventListener('DOMContentLoaded', recalc, false);


//头部时间部分-----------------------------------------------
	var week = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
	var localToday = '';

    var d = new Date();
	var localToday = d.getFullYear() + "/" + (d.getMonth() + 1) + "/" + d.getDate();
	$("#today_data").html(localToday);
	$("#week_data").html(week[d.getDay()]);
	/*
	//	动态显示时间
	var t = null;
	t = setTimeout(time,1000);//开始执行
	function time()
	{
	    clearTimeout(t);//清除定时器
	    var d = new Date();
		var localToday = d.getFullYear() + "/" + (d.getMonth() + 1) + "/" + d.getDate();
		$("#today_data").html(localToday);
		$("#week_data").html(week[d.getDay()]);
		if(d.getHours()<10) {
			$("#hour_id").html("0"+d.getHours());
		}
		else {
			$("#hour_id").html(d.getHours());
		}
		if(d.getMinutes()<10) {
			$("#min_id").html("0"+d.getMinutes()); 
		}
		else {
			$("#min_id").html(d.getMinutes()); 
		}
	    t = setTimeout(time,1000); //设定定时器，循环执行             
	}
	*/
});
